USE [xRepair]
GO

/****** Object:  StoredProcedure [dbo].[ActivateUserAccount]    Script Date: 3/7/2014 4:09:46 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[ActivateUserAccount]
	@ActivationCode		VARCHAR(64),
	@Rowcount			INT = -1 OUTPUT
AS
BEGIN

	SET NOCOUNT ON;

    UPDATE [dbo].[Users]
	SET [IsActive] = 1
		,[ActivationCode] = NULL
	WHERE [ActivationCode] = @ActivationCode

	SELECT @Rowcount = @@ROWCOUNT

END

GO


